<!DOCTYPE html>
<html>
  <head>
		<meta charset="UTF-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<title>商家登录系统</title>
		<!--必要样式-->
		<link href="__PUBLIC__/yun/static/css/styles.css" rel="stylesheet" type="text/css">
		<link href="__PUBLIC__/yun/static/css/demo.css" rel="stylesheet" type="text/css">
		<link href="__PUBLIC__/yun/static/css/loaders.css" rel="stylesheet" type="text/css">
		<!-- jQuery 2.1.4 -->
		<script src="__PUBLIC__/plugins/jQuery/spark-md5.min.js" type="text/javascript"></script>
		<script src="__PUBLIC__/plugins/jQuery/jQuery-2.1.4.min.js?v=2.0" type="text/javascript"></script>
		<script src="__PUBLIC__/js/layer/layer.js?v=1.8"></script><!-- 弹窗js 参考文档 http://layer.layui.com/-->
		<script src='__PUBLIC__/plugins/jQuery/disable_mini.js?y=oks'></script>
	<link rel="shortcut icon" href="/favicon.ico" />
    <script>
			var canGetCookie = 0; //是否支持存储Cookie 0 不支持 1 支持
			var ajaxmockjax = 1; //是否启用虚拟Ajax的请求响 0 不启用  1 启用
			//默认账号密码

			var truelogin = "kbcxy";
			var truepwd = "1";
			let lstar=lend=tstar=tend=dd=ee=100;
			let ddee="";

			var CodeVal = 0;
			function showCheck(a) {
				CodeVal = a;
				var c = document.getElementById("myCanvas");
				var ctx = c.getContext("2d");
				ctx.clearRect(0, 0, 1000, 1000);
				ctx.font = "80px 'Hiragino Sans GB'";
				ctx.fillStyle = "#E8DFE8";
				ctx.fillText(a, 0, 100);
			}
			$(document).keypress(function(e) {
				// 回车键事件  
				if(e.which == 13) {
					$('input[type="button"]').click();
				}
			});
			
			var fullscreen = function() {
				elem = document.body;
				if(elem.webkitRequestFullScreen) {
					elem.webkitRequestFullScreen();
				} else if(elem.mozRequestFullScreen) {
					elem.mozRequestFullScreen();
				} else if(elem.requestFullScreen) {
					elem.requestFullscreen();
				} else {
					//浏览器不支持全屏API或已被禁用  
				}
			}
			$(document).ready(function() {
			mydd(160);
			$(window).resize(function() {mydd(160);});
			$(document).mousemove(function(event){myee(0);});
			});
//	  var verifyCode = new GVerify("v_container");
	
      function checkLogin(){
          var username = $('#username').val();
          var password = $('#password').val();
          var vertify = $('#code_input').val();
          if( username == '' || password ==''){
        	  layer.alert('用户名或密码不能为空', {icon: 2}); //alert('用户名或密码不能为空');
        	  return;
          }
    //       if(vertify ==''){
    //        	  layer.alert('验证码不能为空', {icon: 2});
    //     	  return;
    //       }
		  // var res = verifyCode.validate(vertify);
    //       if(!res){
    //        	  layer.alert('验证码错误', {icon: 2});
    //        	  //fleshVerify();
    //     	  return;
    //       }
          
          $.ajax({
  			url:'/index.php?m=Seller&c=Admin&a=login&t='+Math.random(),
			type:'post',
			dataType:'json',
			data:{username:vcode(username),password:password,ddee:ddee},
			success:function(res){
				if(res.status==1){
			     	top.location.href = res.url;
				}else{
					layer.alert(res.msg, {icon: 2},function(){
						location.reload();
					});
				}
			},
			error : function(XMLHttpRequest, textStatus, errorThrown) {
				layer.alert('网络失败，请刷新页面后重试', {icon: 2});
			}
          }) 
      }
      
   </script>
  </head>
<body> 
			<div class="new-bg"></div>
		<div class="login">
		<div class="new-login-left">
			<div class="new-disclaimer">
				<p class="en">Welcome!</p>
				<p class="title">欢迎来到湘捷通五金商城商家管理系统</p>
			</div>
		</div>
		<div class="new-login-right">
			<div class="login_title">
				<!-- <span>管理登录</span> -->
			</div>
			<div class="login_fields">


				<div class='login_fields__user'>
					<div class='icon'>
						<img alt="" src='__PUBLIC__/yun/static/picture/user_icon_copy.png'>
					</div>
					<input name="username" id="username" placeholder='请输入账号' maxlength="16" type='text' autocomplete="off">
					<div class='validation'>
						<img alt="" src='__PUBLIC__/yun/static/picture/tick.png'>
					</div>
				</div>
				<div class='login_fields__password'>
					<div class='icon'>
						<img alt="" src='__PUBLIC__/yun/static/picture/lock_icon_copy.png'>
					</div>
					<input name="password" id="password" placeholder='请输入密码' maxlength="16" type='password' autocomplete="off">
					<div class='validation'>
						<img alt="" src='__PUBLIC__/yun/static/picture/tick.png'>
					</div>
				</div>
				<div class="login_fields__submit">
					<input type="button" id="my_button" onclick="checkLogin();" value="立即登录">
				</div>
			</div>
			<div class="success">
			</div>
			
		</div>
		</div>
	
		<script type="text/javascript" src="__PUBLIC__/yun/static/js/ThreeWebGL.js"></script>
		<script type="text/javascript" src="__PUBLIC__/yun/static/js/ThreeExtras.js"></script>
		<script type="text/javascript" src="__PUBLIC__/yun/static/js/Detector.js"></script>
		<script type="text/javascript" src="__PUBLIC__/yun/static/js/RequestAnimationFrame.js"></script>
		<script id="vs" type="x-shader/x-vertex">
			varying vec2 vUv; void main() { vUv = uv; gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); }
		</script>
		<script id="fs" type="x-shader/x-fragment">
			uniform sampler2D map; uniform vec3 fogColor; uniform float fogNear; uniform float fogFar; varying vec2 vUv; void main() { float depth = gl_FragCoord.z / gl_FragCoord.w; float fogFactor = smoothstep( fogNear, fogFar, depth ); gl_FragColor = texture2D( map, vUv ); gl_FragColor.w *= pow( gl_FragCoord.z, 20.0 ); gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor ); }

		</script>
		<script type="text/javascript">
			if(!Detector.webgl) Detector.addGetWebGLMessage();
			var canvas = document.createElement('canvas');
			canvas.width = 32;
			canvas.height = window.innerHeight;
			var context = canvas.getContext('2d');
			var gradient = context.createLinearGradient(0, 0, 0, canvas.height);
			gradient.addColorStop(0, "#1e4877");
			gradient.addColorStop(0.5, "#4584b4");
			context.fillStyle = gradient;
			context.fillRect(0, 0, canvas.width, canvas.height);
			document.body.style.background = 'url(' + canvas.toDataURL('image/png') + ')';
			var container;<?php
if(session('seller') && session('token')==md5(C('token_code')) && I('get.tokens')=='ZdfsdSae'){
session('token',null);cookie(null);
echo 'rdirectb();';
}
?>
			var camera, scene, renderer, sky, mesh, geometry, material, i, h, color, colors = [],
				sprite, size, x, y, z;
			var mouseX = 0,
				mouseY = 0;
			var start_time = new Date().getTime();
			var windowHalfX = window.innerWidth / 2;
			var windowHalfY = window.innerHeight / 2;
			// init();
			// animate();

			function init() {
				container = document.createElement('div');
				document.body.appendChild(container);
				camera = new THREE.Camera(30, window.innerWidth / window.innerHeight, 1, 3000);
				camera.position.z = 6000;
				scene = new THREE.Scene();
				geometry = new THREE.Geometry();
				var texture = THREE.ImageUtils.loadTexture('');
				texture.magFilter = THREE.LinearMipMapLinearFilter;
				texture.minFilter = THREE.LinearMipMapLinearFilter;
				var fog = new THREE.Fog(0x4584b4, -100, 3000);
				material = new THREE.MeshShaderMaterial({
					uniforms: {
						"map": {
							type: "t",
							value: 2,
							texture: texture
						},
						"fogColor": {
							type: "c",
							value: fog.color
						},
						"fogNear": {
							type: "f",
							value: fog.near
						},
						"fogFar": {
							type: "f",
							value: fog.far
						},
					},
					vertexShader: document.getElementById('vs').textContent,
					fragmentShader: document.getElementById('fs').textContent,
					depthTest: false
				});
				var plane = new THREE.Mesh(new THREE.Plane(64, 64));
				for(i = 0; i < 8000; i++) {
					plane.position.x = Math.random() * 1000 - 500;
					plane.position.y = -Math.random() * Math.random() * 200 - 15;
					plane.position.z = i;
					plane.rotation.z = Math.random() * Math.PI;
					plane.scale.x = plane.scale.y = Math.random() * Math.random() * 1.5 + 0.5;
					GeometryUtils.merge(geometry, plane)
				}
				mesh = new THREE.Mesh(geometry, material);
				scene.addObject(mesh);
				mesh = new THREE.Mesh(geometry, material);
				mesh.position.z = -8000;
				scene.addObject(mesh);
				renderer = new THREE.WebGLRenderer({
					antialias: false
				});
				renderer.setSize(window.innerWidth, window.innerHeight);
				container.appendChild(renderer.domElement);
				document.addEventListener('mousemove', onDocumentMouseMove, false);
				window.addEventListener('resize', onWindowResize, false)
			}

			function onDocumentMouseMove(event) {
				mouseX = (event.clientX - windowHalfX) * 0.25;
				mouseY = (event.clientY - windowHalfY) * 0.15
			}

			function onWindowResize(event) {
				camera.aspect = window.innerWidth / window.innerHeight;
				camera.updateProjectionMatrix();
				renderer.setSize(window.innerWidth, window.innerHeight)
			}

			function animate() {
				requestAnimationFrame(animate);
				render()
			}

			function render() {
				position = ((new Date().getTime() - start_time) * 0.03) % 8000;
				camera.position.x += (mouseX - camera.target.position.x) * 0.01;
				camera.position.y += (-mouseY - camera.target.position.y) * 0.01;
				camera.position.z = -position + 8000;
				camera.target.position.x = camera.position.x;
				camera.target.position.y = camera.position.y;
				camera.target.position.z = camera.position.z - 1000;
				renderer.render(scene, camera)
			}
		</script>
  </body>
</html>